; 等待进程关闭
Process, WaitClose, WindowsTerminal.exe
NewPid := ErrorLevel
If NewPid
{
    MsgBox, the process not closed %NewPid%
}
Else
{
    MsgBox, process is closed
}
Return